import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import Router from './router';
import api from './api';
import GlobalLoading from '@/components/GlobalLoading';
import Storage from '@/utils/Storage';
import * as decorators from '@/utils/decorators';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/es/locale/zh_CN';

import 'antd/dist/antd.css';
import './assets/css/base';
import store from './redux/store';
Object.keys(decorators).forEach(key => {
	window[key] = decorators[key];
});
window.$api = api;
window.$utils = {
	Storage,
	GlobalLoading
};
ReactDOM.render(
	<Provider store={store}>
		<ConfigProvider locale={zhCN}>
			<Router />
		</ConfigProvider>
	</Provider>,
	document.getElementById('app')
);
